package cn.edu.abtu.controller;

import cn.edu.abtu.service.EduSubjectService;
import cn.edu.abtu.vo.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;


@RestController
@CrossOrigin
@RequestMapping("/eduservice/subject")
public class EduSubjectController {
    /**
     * 服务对象
     */
    @Autowired
    private EduSubjectService eduSubjectService;

    @PostMapping("/uploadSubject")
    public ResponseData uploadSubject(MultipartFile file){
        return eduSubjectService.uploadSubject(file);
    }

    @GetMapping("/getAllSubject")
    public ResponseData getAllSubject(){
        return eduSubjectService.getAllSubject();
    }

}

